package com.wuwangfu.stream;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * @Author jcshen
 * @Date 2023-02-21
 * @PackageName:com.wuwangfu.stream
 * @ClassName: DGenSeq
 * @Description: TODO
 * @Version 1.0
 * fromSequence 多并行度，有限数据集，用于测试
 */
public class DGenSeq {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

        DataStreamSource<Long> nums = env.fromSequence(1,100);
        //env.generateSequence(1, 100);
        System.out.println(nums.getParallelism());

        nums.print();
        env.execute();
    }
}
